﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Loja.Data;

namespace Loja.Business
{
    public class MarcaBLL
    {
        public List<SelectListItem> GetMarca()
        {
            IRepository<Marca> marcaRepository = new DataRepository<Marca>();

            var marca = marcaRepository.GetAll();
            var marcaSelectList = new SelectList(marca, "IdMarca", "Nome").ToList();
            marcaSelectList.Insert(0, new SelectListItem() { Selected = true, Text = "Selecione", Value = "" });

            return marcaSelectList;
        }
    }
}
